#ifndef QRSAGSMAPFLASH_H
#define QRSAGSMAPFLASH_H

#include <QObject>
#include <QRectF>
#include <QPointF>
#include <QPen>
#include <QColor>
#include <QList>
#include <QPainter>
#include <QTimer>
#include <QStyleOptionGraphicsItem>
#include <QWidget>
#include "qgsmapcanvasitem.h"
#include "qgsrectangle.h"
#include "qgsmapcanvas.h"

class QRSAGSMapFlash : public QObject, public QgsMapCanvasItem
{
    Q_OBJECT
    Q_INTERFACES(QGraphicsItem)
public:
    explicit QRSAGSMapFlash(QgsMapCanvas *mapCanvas = nullptr);
    ~QRSAGSMapFlash();

    QgsMapCanvas *mMapCanvas = nullptr;
    bool flg = false;
    bool isPaint= false;
    QImage copyImage;

    QList<QgsMapLayer *> mMapLayers;

    void clear();
    void setLayers(QList<QgsMapLayer*> mapLayerList);
    void setImage(QImage image);

    QList<QgsMapLayer *> getMapLayers();

protected:
    void paint(QPainter *painter);

};

#endif // QRSAGSMAPFLASH_H
